<!DOCTYPE html>
<!-- 通过 xmlns:th=”http://www.thymeleaf.org“ 命令空间，将静态页面转换为动态的视图，
需要进行动态处理的元素,将使用“th:”前缀。 -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title></title>

    <link rel="stylesheet" href="webjars/bootstrap/3.4.1/css/bootstrap.css">
    <script src="webjars/jquery/3.6.0/jquery.js"></script>
    <script src="webjars/bootstrap/3.4.1/js/bootstrap.js"></script>

    <link rel="stylesheet" href="css/novel.css">

</head>

<body>
<div class="container">

    <!--LOGO区域-->
    <div class="logo">
        <div class="logo-img"></div>
        <div class="right">
            <div class="nav">
                <a href="">学校</a> |
                <a href="">推荐</a> |
                <a th:href="@{/toNovelDetail(novelId=${novelCharpt.novelId} ) }">返回简介页</a> |
                <a th:href="@{/ }">返回首章</a>
            </div>

        </div>
    </div>

    <!---小说相关信息-->
    <div class="novle-info">
        <div class="title">
            <span> [[ ${charptInfo.title } ]] </span>
        </div>
        <div class="tip">
            校长<span> [[ ${novelCharpt.authorName} ]] </span> &nbsp;

            浏览记录: <span> [[ ${novelCharpt.title } ]]  </span> &nbsp;
            上次时间: <span> [[ ${novelCharpt.pushTime } ]] </span>
        </div>
    </div>

    <!-- 内容提要 -->
    <div class="charpt-info">
        <h2 style="text-align: center;"> [[ ${charptInfo.title} ]] </h2>
        <p>
            &nbsp;&nbsp;&nbsp;&nbsp;
            [[ ${charptInfo.content } ]]

        </p>
    </div>

    <!-- 小说章节分章 -->
    <div class="charpt">
        <div class="charpt-count">
            本章显示 <span>  [[ ${charptInfo.content.length() } ]] </span> 字 &nbsp;&nbsp;&nbsp;&nbsp;
            共<span> [[ ${novelCharpt.charptList.size() } ]] </span>章 &nbsp;&nbsp;&nbsp;&nbsp;
            当前第<span> [[ ${charptInfo.sort } ]] </span>章
        </div>


        <!-- 分章开始 -->
        <div class="page-query">

            <a th:href="@{/toNovelcharpt(novelId=${charptInfo.novelId} ) }">返回章节列表页</a>

            <a th:href="@{/toNovle(novelId=${charptInfo.novelId},sort=1 ) } ">首章</a>


            <!--如果当前章为第一章时，就没有上一章 -->
            <a th:if="${charptInfo.sort <=1}"
               th:href="@{/toNovle(novelId=${charptInfo.novelId},sort=${charptInfo.sort+1} ) }">下一章</a>


            <!--如果当前章为中间章时，就有上一章 和 下一章  -->

            <span th:if="${charptInfo.sort>1  && charptInfo.sort < novelCharpt.charptList[ novelCharpt.charptList.size()-1 ].sort}">
                <a th:href="@{/toNovle(novelId=${charptInfo.novelId},sort=${charptInfo.sort-1} ) }">上一章</a>
                <a th:href="@{/toNovle(novelId=${charptInfo.novelId},sort=${charptInfo.sort+1} ) }">下一章</a>

            </span>


            <!-- 如果当前章是最后一章，就没有下一章 -->

            <a th:if="${charptInfo.sort >= novelCharpt.charptList[ novelCharpt.charptList.size()-1 ].sort  } "
               th:href="@{/toNovle(novelId=${charptInfo.novelId},sort=${charptInfo.sort-1}  )}">上一章</a>


            <!--尾章 -->
            <a th:href="@{/toNovle(novelId=${charptInfo.novelId},sort=${novelCharpt.charptList[ novelCharpt.charptList.size()-1 ].sort } ) }">尾章</a>


        </div>
    </div>


    <!-- 版本声明区域-->
    <div class="footer">
        <div class="my">
            关于我们 - 网址帮助 - 广告服务 - 版权声明 - 友情连接 - 网站地图
        </div>

        <div class="version-info">
            Copyright &copy; www.huhua.com All Rights Revered 章面版权所有 时光小说下载网 ICP备 187***64号
        </div>
    </div>
</div>
</body>
</html>